﻿using System;
class Prob1FighterAttack
{
    static void Main()
    {
        int targetUpperLCoordX;
        int targetUpperLCoordY;
        int targetLowerRCoordX;
        int targetLowerRCoordY;
        int fighterPositionX;
        int fighterPositionY;
        int distanceShoot;
        int directHitX;
        int directHitY;
        int damage = 0;
        targetUpperLCoordX = int.Parse(Console.ReadLine());
        targetUpperLCoordY = int.Parse(Console.ReadLine());
        targetLowerRCoordX = int.Parse(Console.ReadLine());
        targetLowerRCoordY = int.Parse(Console.ReadLine());
        fighterPositionX = int.Parse(Console.ReadLine());
        fighterPositionY = int.Parse(Console.ReadLine());
        distanceShoot = int.Parse(Console.ReadLine());
        directHitX = fighterPositionX + distanceShoot;
        directHitY = fighterPositionY;
        if (((directHitX <= Math.Max(targetUpperLCoordX, targetLowerRCoordX)) && (directHitX >= Math.Min(targetUpperLCoordX, targetLowerRCoordX)))
    && ((directHitY <= Math.Max(targetUpperLCoordY, targetLowerRCoordY)) && directHitY >= Math.Min(targetUpperLCoordY, targetLowerRCoordY)))
        {
            damage += 100;
        }
        if ((((directHitX + 1) <= Math.Max(targetUpperLCoordX, targetLowerRCoordX)) && ((directHitX + 1) >= Math.Min(targetUpperLCoordX, targetLowerRCoordX)))
    && ((directHitY <= Math.Max(targetUpperLCoordY, targetLowerRCoordY)) && directHitY >= Math.Min(targetUpperLCoordY, targetLowerRCoordY)))
        {
            damage += 75;
        }
        if (((directHitX <= Math.Max(targetUpperLCoordX, targetLowerRCoordX)) && (directHitX >= Math.Min(targetUpperLCoordX, targetLowerRCoordX)))
    && (((directHitY + 1) <= Math.Max(targetUpperLCoordY, targetLowerRCoordY)) && ((directHitY + 1) >= Math.Min(targetUpperLCoordY, targetLowerRCoordY))))
        {
            damage += 50;
        }
        if (((directHitX <= Math.Max(targetUpperLCoordX, targetLowerRCoordX)) && (directHitX >= Math.Min(targetUpperLCoordX, targetLowerRCoordX)))
    && (((directHitY - 1) <= Math.Max(targetUpperLCoordY, targetLowerRCoordY)) && ((directHitY - 1) >= Math.Min(targetUpperLCoordY, targetLowerRCoordY))))
        {
            damage += 50;
        }
        Console.WriteLine("{0}%", damage);
    }
}

